import React, { /*Suspense*/ } from "react";
import ReactDOM from "react-dom/client";
import { HashRouter } from "react-router-dom";
import { Provider } from "react-redux";
import { ThemeProvider } from "styled-components";

import "normalize.css";
import "@/assets/css/index.less";
import 'antd/dist/antd.less';
import App from "./App";
import store from "@/store";
import theme from "./assets/theme";

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
  // <Suspense fallback="loading">  // 异步加载 会导致部分数据监听不到
  <Provider store={ store }>
    {/*<Suspense fallback="loading">*/}
      <HashRouter>
        <ThemeProvider theme={ theme }>
          <App/>
        </ThemeProvider>
      </HashRouter>
    {/*</Suspense>*/}
  </Provider>
  // </Suspense>
);
